<template>
	<view>
		<view class="" v-for="item in res" style="height: 110upx;background-color: #fff;margin-top: 20upx;display: flex;line-height: 100upx;">
			<image style="width: 95upx;height: 90upx;margin:10upx 0upx 10upx 20upx;border-radius: 50upx;" :src="item.real_head_img" mode=""></image>
			
			<view class="" style="line-height: 50upx;margin-left: 20upx;">
				<text style="font-weight: bold;">{{item.real_name}}</text>
				<view class="" style="color: #7D7D7D;">
					<text>加入时间:</text><text>{{item.create_time.substring(0,10)}}</text>
				</view>
			</view>
			<view class="" style="color: #7D7D7D;">
				<text>级别:</text><text style="font-weight: bold;color: #000000;">总代</text>
			</view>
			<switch style="margin-left: 100upx;" checked color="#000" @change="switchChange" />
		</view>
	
		<view class="">
			<!-- <text>{{res.data.list[0].goods_desc}}</text> -->
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				res : {},
				openid:'',
				real_name:'',
				real_head_img:'',
				create_time:''
			}
		},
		onLoad: function() {
			 uni.getStorage({
			         key: 'user_id',
			         success: (res) => {
			          this.user_id = res.data
			          this.setajax()
			         },
			        });
			},
		methods: {
			setajax(){
				uni.request({
					url: 'https://cx.mingmeijt.com/Api/User/myFriend',
					method: 'POST',
					data: {
						user_id: this.user_id,
						select_user_id:'2018'
					},
					header:{'Content-Type':'application/x-www-form-urlencoded'},
					success: res => {
					this.res = res.data.data
					console.log(this.res)
					},
					fail: () => {},
					complete: () => {}
				});
			},
			
		}
	}
</script>

<style>

</style>
